package net.lab1024.sa.admin.module.business.roland.domain.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 客户信息表 列表VO
 *
 * @Author dragon
 * @Date 2023-12-11 13:27:12
 * @Copyright dragon
 */

@Data
public class RolandCustomerVO {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "学生姓名")
    private String studentName;

    @ApiModelProperty(value = "免费票数")
    private Integer freeNum;

    @ApiModelProperty(value = "限购票数")
    private Integer totalNum;

    private String performanceTypeIds;

    @ApiModelProperty(value = "表演曲目")
    private String performanceType;

    public List<Integer> getPerformanceTypeIds() {
        if (performanceTypeIds != null) {
            return Arrays.stream(performanceTypeIds.split(","))
                    .map(Integer::valueOf)
                    .collect(Collectors.toList());
        }
        return null;
    }
}